<template>
  <div class="not-found">
    <div class="error-content">
      <div class="error-icon">
        <i class="el-icon-warning-outline"></i>
      </div>
      
      <h1 class="error-title">404</h1>
      <p class="error-subtitle">页面不存在</p>
      <p class="error-description">抱歉，您访问的页面不存在或已被移除</p>
      
      <div class="error-actions">
        <el-button type="primary" @click="goHome">
          <i class="el-icon-house"></i>
          返回首页
        </el-button>
        <el-button @click="goBack">
          <i class="el-icon-back"></i>
          返回上页
        </el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/dashboard')
}

const goBack = () => {
  router.back()
}
</script>

<style lang="scss" scoped>
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--apple-background-primary);
  
  .error-content {
    text-align: center;
    max-width: 500px;
    padding: var(--apple-spacing-xl);
    
    .error-icon {
      font-size: 72px;
      color: var(--apple-color-warning);
      margin-bottom: var(--apple-spacing-lg);
    }
    
    .error-title {
      font-size: 64px;
      font-weight: var(--apple-font-weight-bold);
      color: var(--apple-text-primary);
      margin: 0 0 var(--apple-spacing-md);
    }
    
    .error-subtitle {
      font-size: var(--apple-font-size-xl);
      font-weight: var(--apple-font-weight-semibold);
      color: var(--apple-text-primary);
      margin: 0 0 var(--apple-spacing-sm);
    }
    
    .error-description {
      color: var(--apple-text-secondary);
      margin: 0 0 var(--apple-spacing-xl);
      line-height: 1.6;
    }
    
    .error-actions {
      display: flex;
      gap: var(--apple-spacing-md);
      justify-content: center;
      
      :deep(.el-button) {
        border-radius: var(--apple-radius-md);
        
        i {
          margin-right: var(--apple-spacing-xs);
        }
      }
    }
  }
}
</style>